import i18n from '@/common/lang'

export const columns = [
  {
    label: '采购申请单号',
    minWidth: 150,
    prop: 'number',
    fixed: true
  },
  {
    label: '申请标题',
    minWidth: 140,
    prop: 'title'
  },
  {
    label: '申请类型',
    minWidth: 140,
    prop: 'type'
  },
  {
    label: '申请部门',
    minWidth: 140,
    prop: 'deptName'
  },
  {
    label: '申请人',
    prop: 'createName',
    minWidth: 90
  },
  {
    label: '申请时间',
    prop: 'createTime',
    minWidth: 170
  }
]
export const actions = [
  {
    key: 'detail',
    text: i18n.t('common.detail'),
    permissions: 'purchase:apply:detail'
  }
]

export const detailColumns = [
  {
    label: '需求行号',
    minWidth: 80,
    prop: 'lineNumber',
    fixed: true
  },
  {
    label: i18n.t('config.material.code'),
    minWidth: 140,
    prop: 'materialCode',
    fixed: true
  },
  {
    label: i18n.t('config.material.name'),
    minWidth: 140,
    prop: 'materialName',
    fixed: true
  },
  {
    label: i18n.t('config.material.specs'),
    minWidth: 140,
    prop: 'materialSpecs'
  },
  {
    label: i18n.t('config.material.remark'),
    minWidth: 140,
    prop: 'remark'
  },
  {
    label: i18n.t('config.materialType.name'),
    minWidth: 140,
    prop: 'materialType'
  },
  {
    label: i18n.t('config.material.unit'),
    minWidth: 80,
    prop: 'materialUnit'
  },
  {
    label: '需求数量',
    minWidth: 100,
    prop: 'quantity'
  },
  {
    label: '期望到货日期',
    minWidth: 170,
    prop: 'arrivalDate'
  },
  {
    label: '状态',
    width: 80,
    prop: 'state'
  }
]
